package com.whpu.mall.ware.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.whpu.common.utils.PageUtils;
import com.whpu.mall.ware.entity.WareSkuEntity;
import com.whpu.mall.ware.vo.SkuHasStockVo;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author FanboKai
 * @email fanbokai163@163.com
 * @date 2020-11-20 23:19:07
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    //条件查找商品库存
    PageUtils queryPageByCondition(Map<String, Object> params);

    //添加库存,当前商品(sku_id)给哪个仓库(ware_id)添加多少库存(stock)
    void addStock(Long skuId, Long wareId, Integer skuNum);

    //查询对应sku是否有库存
    List<SkuHasStockVo> getSkusHasStock(List<Long> skuIds);
}

